package P1.gaojingdu;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @date:2022/10/23
 * @author:LdLtd
 * @name:idealist
 */
public class Multiply {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        int b = sc.nextInt();
        List<Integer> A = new ArrayList<>();
        for (int i = a.length() - 1; i >= 0; i--) A.add(a.charAt(i) - '0');
        List<Integer> C=mul(A,b);
        for (int i = C.size()-1; i >=0; i--) {
            System.out.print(C.get(i));
        }
    }
    public  static List<Integer>mul(List<Integer>A,int b){
        List<Integer> C = new ArrayList<>();
        int t=0;
        //b为一个整体
        for (int i = 0; i < A.size()||t!=0; i++) {
            if(i<A.size()) t+= A.get(i) *b;
            C.add(t%10);
            t/=10;
        }
        //高位为0时
        while (C.size() > 1 && C.get(C.size() - 1) == 0) C.remove(C.size() - 1);

        return C;
    }
}
